/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package GoMail;

import account.Account;
import folders2.UserFolders2;
import java.io.File;
import java.io.IOException;

/**
 *
 * @author Administrator
 */
public class MailUser implements MailUserInterface
{
    private Account userAccount;
    private UserFolders2 folders;
    //private Profile userProfile;
    /**
     * Constructor to initialize new user in mail
     * initialize accout and folders with empty data which will set after that
     */
    public MailUser()
    {
        userAccount = new Account();
        folders = new UserFolders2();
    }
    /**
     * Constructor to create new user in mail
     * @param parent
     * @param c
     * @throws java.io.IOException
     */
    public MailUser(File parent,Account c) throws IOException
    {
        userAccount = c;
        folders = new UserFolders2(parent,userAccount.getUserName());
    }
    /**
     * This method is used to get reference to all folder of the mail user
     * @return reference to all folder of the mail user
     */
    public UserFolders2 getFolders()
    {
        return folders;
    }
    /**
     *  This method is used to set references to all folder of the mail user
     * @param folders new reference to all folder of the mail user
     */
    public void setFolders(UserFolders2 folders)
    {
        this.folders = folders;
    }
    /**
     *  This method is used to user account
     * @return user account
     */
    public Account getUserAccount()
    {
        return userAccount;
    }
    /**
     *  This method is used to set user account
     * @param userAccount new user account
     */
    public void setUserAccount(Account userAccount)
    {
        this.userAccount = userAccount;
    }



}
